import { getGameObjectById } from "../engine";
import { Behaviour } from "../engine/Behaviour";
import { TextRenderer } from "../engine/TextRenderer";
import { Transform } from "../engine/Transform";
import { number } from "../engine/validators/number";
import { Display } from "./Display";

export class BillSystemClose extends Behaviour {


    onStart() {
        this.gameObject.onClick = () => {
             console.log(this.gameObject.id);
            if(this.gameObject.id=="UI_button_Bill_close"){         
                getGameObjectById('UI_Bill').getBehaviour(Display).IsActive=false;
                getGameObjectById('UI_button_Bill_close').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_day_number').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_Income').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_Fee').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_Rental').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_cost').getBehaviour(Display).IsActive=false;
                getGameObjectById('Text_profit').getBehaviour(Display).IsActive=false;
            }
            }


        };

        onTick(duringTime: number) {

        }
    }


